<{include file="element/inc_header.html"}>
 
<div class="main-container" id="main-container">
	<script type="text/javascript">
		try{ace.settings.check('main-container' , 'fixed')}catch(e){}
	</script>

	<div class="main-container-inner">  
		<div class="page-content"> 
			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS --> 
					<div class="row">
						<div class="col-xs-12">  
							<div class="step-content row-fluid position-relative" id="step-container">
								<div class="step-pane active" id="step1">
									<h3 class="lighter block green">修改用户余额</h3>

									<div class="form-horizontal" id="sample-form">
										<div class="form-group has-info"> 
											<label for="inputInfo" class="col-xs-12 col-sm-2 control-label no-padding-right">【<{$userinfo.username}>】的现有余额</label>
											<div class="col-xs-12 col-sm-6">
												<span class="block input-icon input-icon-right"> 
													 <input readonly= type="text" value="<{$userinfo.blance}>" class="width-100" />
												</span>
											</div> 
										</div> 
										<div class="form-group has-info">
											<input type="hidden" value="<{$userinfo.id}>" id="user_id" />
											<label for="inputInfo" class="col-xs-12 col-sm-2 control-label no-padding-right">请输入用户余额</label>
											<div class="col-xs-12 col-sm-6">
												<span class="block input-icon input-icon-right">
													<input type="text" value="<{$userinfo.blance}>" id="txt_blance" class="width-100" />
													<i class="icon-info-sign"></i>
												</span>
											</div>
											<div class="help-block col-xs-12 col-sm-reset inline">直接修改用户余额</div>
										</div> 
										<div class="hr hr-dotted"></div>  
										<div class="row-fluid" style="text-align: center">
											<button id="savebtn" class="btn btn-prev">
												<i class="icon-arrow-left"></i>
												保存修改
											</button>

											<button id="reback" class="btn btn-success btn-next" data-last="Finish ">
												<i class="icon-arrow-right icon-on-right"></i>
												取消修改
											</button>
										</div>
										
									</div>
								</div> 
							</div>
							

						</div> 	 	
					</div>
 
				</div><!-- /.col -->
			</div><!-- /.row --> 
		</div><!-- /.page-content --> 
  
	</div><!-- /.main-container -->
</div>
<{include file="element/js_lib.html"}>
<script language="javascript">
var userid = $('#user_id').val();
	$(function(){  
	
	$('#savebtn').click(function(){
		var bla = parseInt($('#txt_blance').val());
		if(bla<1){
			alert('请输入余额值');
			return false;
		}
		$.getJSON('/admin.php/oper/doedituserblance?userid='+userid+'&blance='+bla,function(obj){
			alert(obj.m);
			if(obj.s) location.href = '/admin.php/oper/userblance';
		});
	});
	
	$('#reback').click(function(){
		history.back();
	});
	
		});
</script>
